<template>
  <div id="blankChange">
    <el-collapse v-model="open">
      <el-collapse-item title="内容样式" name="1">
        <ul class="content-list">
          <li>
            <span>背景颜色：</span>
            <div>
              <colorSetting v-model="styles.colorBg" :originColor="styles.colorBg" initColor="#fff"></colorSetting>
            </div>
          </li>
          <li>
            <span>元素高度：</span>
            <div>
              <edgeSetting v-model="styles.height" unit="px" :max="200" :init="Number(styles.height)"></edgeSetting>
            </div>
          </li>
        </ul>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
import { mapState, mapMutations } from "vuex";
import edgeSetting from "../../comm/edgeSetting";
import colorSetting from "../../comm/colorSetting";
export default {
  name: "blankChange",
  data() {
    return {
      open: "1",
    };
  },
  
  watch:{
    currentId(){
      console.log(this.styles)
    }
  },
  computed: {
    ...mapState(["list", "currentId", "currentName"]),
    styles() {
      return this.list[this.currentId].styles;
    },
  },
  components: {
    edgeSetting,
    colorSetting,
  },
};
</script>

<style lang="less" scoped>
@import url("../../../assets/css/base.less");
.danwei {
  background-color: #e9edef;
  margin-left: 30px;
  span {
    padding: 0 5px;
    font-size: 14px;
  }
}
</style>
